#!/bin/sh

#TODO Remove ERTM after kernel patch is deployed in the wild
ERTM_OVERRIDE="/etc/modprobe.d/99-xpadneo-bluetooth.conf"

[ -L "${ERTM_OVERRIDE}" ] || { echo "Uninstalling ERTM override..."; rm -f "${ERTM_OVERRIDE}"; }

echo "Uninstalling modalias database..."
rm -f /etc/modprobe.d/xpadneo.conf

echo "Uninstalling udev rules..."
rm -f /etc/udev/rules.d/60-xpadneo.rules
rm -f /etc/udev/rules.d/50-xpadneo-fixup-steamlink.rules

echo "Reloading udev..."
udevadm control --reload
